<template>
  <el-button @click="logout" type="danger">退出</el-button>
</template>

<script lang="ts" setup>
import { ref } from 'vue'
// import type { UploadInstance } from 'element-plus'
import { useStore } from 'vuex'
import { useRouter } from 'vue-router'

const store = useStore()
const router = useRouter()
const logout = () => {
  store.dispatch('logout')
  router.push({name:'login'})
}
</script>

<style lang="scss" scoped>

</style>
